{?set jieqi_page_rows = "50"?}
<table class="grid" width="100%" align="center">
	<tr>
	<td>
	  <form name="frmmake" method="post" action="{?$jieqi_modules['pay']['url']?}/admin/creport.php">
		选择年月：
	  <select name="ryear">
	  {?section name=i loop=$ryearrows?}
	  <option value="{?$ryearrows[i]?}"{?if $ryearrows[i] == $dyear?} selected="selected"{?/if?}>{?$ryearrows[i]?}年</option>
	  {?/section?}
	  </select>
	  <select name="rmonth">
	  {?section name=i loop=$rmonthrows?}
	  <option value="{?$rmonthrows[i]?}"{?if $rmonthrows[i] == $dmonth?} selected="selected"{?/if?}>{?$rmonthrows[i]?}月</option>
	  {?/section?}
	  </select>
	  <input type="hidden" name="act" value="make" />{?$jieqi_token_input?}
	  <button type="submit" name="btnsearch" class="button">生成月报表</button>
	  <span class="hot">注意：只能生成本月之前的报表，如果数据较多请耐心等待！</span>
	  </form>
	</td>
	</tr>
    <tr>
      <td>
	  <form name="frmsearch" method="get" action="{?$jieqi_modules['pay']['url']?}/admin/creport.php">
	  {?if $jieqi_channels|count > 0?}
		用户渠道：
		<select class="select"  size="1" name="channel">
			<option value="">不限</option>
			{?section name=i loop=$jieqi_channels?}
			<option value="{?$i['key']?}"{?if $_request['channels'] == $i['key']?} selected="selected"{?/if?}>{?$jieqi_channels[i].name?}</option>
			{?/section?}
		</select>
		&nbsp;&nbsp;
		{?/if?}
	  &nbsp; 月份：从 <input name="startmonth" type="text" class="text" size="10" maxlength="10" value="{?$_request['startmonth']?}"> 到 <input name="endmonth" type="text" class="text" size="10" maxlength="10" value="{?$_request['endmonth']?}">
	  结果：
	  <select class="select" size="1" name="format">
		  <option value=""{?if $_request['format'] == ''?} selected="selected"{?/if?}>直接显示</option>
		  <option value="exceltxt"{?if $_request['format'] == 'exceltxt'?} selected="selected"{?/if?}>EXCEL文本</option>
		  <option value="excel5"{?if $_request['format'] == 'excel5'?} selected="selected"{?/if?}>EXCEL5</option>
		  <option value="excel2007"{?if $_request['format'] == 'excel2007'?} selected="selected"{?/if?}>EXCEL2007</option>
	  </select>
	  &nbsp; <button type="submit" name="Submit" class="button">搜  索</button>
	  月份格式：201205
	  </form>
	  </td>
    </tr>
	<tr>
		<td>
		总记录数：{?$creportstat['cot']?}， 总金额：{?$creportstat['summoney']|fen2yuan?}， 总{?$egoldname?}：{?$creportstat['sumegold']|intval?}
		</td>
	</tr>
</table>



<table class="grid" width="100%" align="center">
<caption>
充值统计月报表
</caption>
  <tr align="center">
    <th width="20%">统计月份</th>
    <th width="20%">用户渠道</th>
    <th width="20%">充值次数</th>
	<th width="20%">总金额</th>
	<th width="20%">总{?$egoldname?}</th>
  </tr>
  <tbody id="jieqi_page_contents">
  {?section name=i loop=$creportrows?}
  <tr>
    <td align="center">{?$creportrows[i].reportmonth?}</td>
    <td>{?$creportrows[i].channel?}</td>
    <td align="center">{?$creportrows[i].paycount?}</td>
    <td align="center">{?$creportrows[i].summoney|fen2yuan?}</td>
    <td align="center">{?$creportrows[i].sumegold?}</td>
  </tr>
  {?/section?}
  </tbody>
</table>
<div class="pages">{?$url_jumppage?}</div>